﻿@model Tele.DataModels.Character

<div class="container">
    <div class="row">

        <div class="col-sm-3">
            <img class="img-responsive" src="@Model.Photo" />
        </div>
        <div class="col-sm-9">
            <h2>@Model.Name </h2>
        </div>
    </div>
    <button class="btn btn-default pull-right" onclick="location.href='/Home/DetailsTVShow/@Model.TVShowId'">Back to TV Show</button>
    <button class="btn btn-default pull-right" onclick="location.href='/Home/UpdateCharacter/@Model.Id">Update Character</button>
    <form method="post" action="/Home/DeleteCharacter">
        <input type="hidden" name="id" value="@Model.Id" />
        <input class="btn btn-sm btn-default pull-right" type="submit" value="Delete Character" />
    </form>
    <div class="row">
        <table class="table table-hover">
            <tr>
                <th>TV Show</th>
                <th>TV Image</th>
            </tr>
            @foreach (var tvshow in @Model.TVShows)
            {
                <tr onclick="location.href='/Home/DetailsCharacter/@tvshow.Id'">
                    <td>@tvshow.Title</td>
                    <td><img src="@tvshow.Image" class="img-thumbnail" /></td>
                    <td><a href="/Home/DeleteReview/@tvshow.Id" class="btn btn-sm btn-default">Delete Character</a></td>
                </tr>
            }

        </table>

    </div>
</div>